package com.zscat.mallplus.ums.service;

import com.baomidou.mybatisplus.extension.service.IService;
import com.zscat.mallplus.exception.BusinessMallException;
import com.zscat.mallplus.sys.entity.SysUser;
import com.zscat.mallplus.ums.entity.UmsMember;
import com.zscat.mallplus.vo.AppletLoginParam;

import java.util.Map;

/**
 * <p>
 * 会员表 服务类
 * </p>
 *
 * @author mallplus
 * @since 2019-04-19
 */
public interface IUmsMemberService extends IService<UmsMember> {

    /**
     * 微信网页授权登录
     *
     * @return
     */
    Map<String, Object> loginByWeixinPage(String code) throws BusinessMallException;

    Object loginByWeixin(AppletLoginParam req);

    UmsMember getByUsername(String username);

    SysUser getUserByUsername(String username);

    /**
     * 根据会员编号获取会员
     */
    UmsMember getById(Long id);

    UmsMember queryByOpenId(String openId);

    String refreshToken(String token);

    Object simpleReg(String phone, String password, String confimpassword);
}

